<div class="mt-2 p-2">


  <form nz-form [formGroup]="validateForm">
    <div>
      <!--      <div class="panel-sbuTitle">RS232接口参数设置</div>-->
      <div class="pt-2">
        <div nz-row [nzGutter]="24">

          <div nz-col [nzSpan]="24">
            <nz-form-item>
              <nz-form-label [nzFor]="'desc'" nzRequired>测试描述</nz-form-label>
              <nz-form-control>
                <textarea nz-input formControlName="desc" [attr.id]="'desc'" [nzAutosize]="{ minRows: 3, maxRows: 10 }"></textarea>
              </nz-form-control>
            </nz-form-item>
          </div>

        </div>
      </div>
    </div>

    <ng-container *ngIf="testItemMap.ipConfig">
      <div class="panel-sbuTitle mt-2">网卡设置</div>
      <div formArrayName="ipConfig" class="pt-2">
        <div nz-row [nzGutter]="24">

          <ng-container *ngFor="let item of ipConfig.controls;let ipIndex =index">
            <ng-container [formGroupName]="ipIndex">
              <div nz-col nzSpan="3" class="pt-1">
                <b>=={{ item.get("name").value }}==</b>
              </div>
              <div nz-col [nzSpan]="7">
                <nz-form-item>
                  <nz-form-label [nzFor]="'ip'+ipIndex" nzRequired>ip地址</nz-form-label>
                  <nz-form-control>
                    <input nz-input placeholder="" formControlName="ip" [attr.id]="'ip'+ipIndex"/>
                  </nz-form-control>
                </nz-form-item>
              </div>
              <div nz-col [nzSpan]="7">
                <nz-form-item>
                  <nz-form-label [nzFor]="'netmask'+ipIndex" nzRequired>子网掩码</nz-form-label>
                  <nz-form-control>
                    <input nz-input placeholder="" formControlName="netmask" [attr.id]="'netmask'+ipIndex"/>
                  </nz-form-control>
                </nz-form-item>
              </div>
              <div nz-col [nzSpan]="7">
                <nz-form-item>
                  <nz-form-label [nzFor]="'defaultGateWay'+ipIndex" nzRequired>默认网关</nz-form-label>
                  <nz-form-control>
                    <input nz-input placeholder="" formControlName="defaultGateWay"
                           [attr.id]="'defaultGateWay'+ipIndex"/>
                  </nz-form-control>
                </nz-form-item>
              </div>
            </ng-container>

          </ng-container>
        </div>
      </div>

    </ng-container>


    <ng-container *ngIf="testItemMap.RS422Test">
      <div class="panel-sbuTitle">RS422接口参数设置</div>
      <div formGroupName="RS422Test" class="pt-2">
        <div nz-row [nzGutter]="24">
          <div nz-col [nzSpan]="8">
            <nz-form-item>
              <nz-form-label [nzFor]="'com_422'" nzRequired>串口号</nz-form-label>
              <nz-form-control>
                <nz-select formControlName="com" [attr.id]="'com_422'">
                  <nz-option *ngFor="let com of comList" [nzValue]="com" [nzLabel]="com"></nz-option>
                </nz-select>
              </nz-form-control>
            </nz-form-item>
          </div>
          <div nz-col [nzSpan]="8">
            <nz-form-item>
              <nz-form-label [nzFor]="'baud_422'" nzRequired>波特率</nz-form-label>
              <nz-form-control>
                <nz-select formControlName="baud" [attr.id]="'baud_422'">
                  <nz-option *ngFor="let baud of baudList" [nzValue]="baud" [nzLabel]="baud"></nz-option>
                </nz-select>
                <!--                  <input nz-input formControlName="baud" [attr.id]="'baud_422'"/>-->
              </nz-form-control>
            </nz-form-item>
          </div>
          <div nz-col [nzSpan]="8">
            <nz-form-item>
              <nz-form-label [nzFor]="'period_422'" nzRequired>发送周期</nz-form-label>
              <nz-form-control>
                <input nz-input formControlName="period" [attr.id]="'period_422'"/>
              </nz-form-control>
            </nz-form-item>
          </div>
          <div nz-col [nzSpan]="24">
            <nz-form-item>
              <nz-form-label [nzFor]="'data_422'" nzRequired>数&nbsp;&nbsp;&nbsp;据</nz-form-label>
              <nz-form-control>
                <textarea nz-input formControlName="data" [attr.id]="'data_422'"></textarea>
              </nz-form-control>
            </nz-form-item>
          </div>

        </div>
      </div>

    </ng-container>

    <ng-container *ngIf="testItemMap.RS232Test">

      <div class="panel-sbuTitle">RS232接口参数设置</div>
      <div formGroupName="RS232Test" class="pt-2">
        <div nz-row [nzGutter]="24">
          <div nz-col [nzSpan]="8">
            <nz-form-item>
              <nz-form-label [nzFor]="'com_232'" nzRequired>串口号</nz-form-label>
              <nz-form-control>
                <nz-select formControlName="com" [attr.id]="'com_232'">
                  <nz-option *ngFor="let com of comList" [nzValue]="com" [nzLabel]="com"></nz-option>
                </nz-select>
              </nz-form-control>
            </nz-form-item>
          </div>
          <div nz-col [nzSpan]="8">
            <nz-form-item>
              <nz-form-label [nzFor]="'baud_232'" nzRequired>波特率</nz-form-label>
              <nz-form-control>
                <nz-select formControlName="baud" [attr.id]="'baud_232'">
                  <nz-option *ngFor="let baud of baudList" [nzValue]="baud" [nzLabel]="baud"></nz-option>
                </nz-select>
                <!--                  <input nz-input formControlName="baud" [attr.id]="'baud_232'"/>-->
              </nz-form-control>
            </nz-form-item>
          </div>
          <div nz-col [nzSpan]="8">
            <nz-form-item>
              <nz-form-label [nzFor]="'period_232'" nzRequired>发送周期</nz-form-label>
              <nz-form-control>
                <input nz-input formControlName="period" [attr.id]="'period_232'"/>
              </nz-form-control>
            </nz-form-item>
          </div>
          <div nz-col [nzSpan]="24">
            <nz-form-item>
              <nz-form-label [nzFor]="'data_232'" nzRequired>数&nbsp;&nbsp;&nbsp;据</nz-form-label>
              <nz-form-control>
                <textarea nz-input formControlName="data" [attr.id]="'data_232'"></textarea>
              </nz-form-control>
            </nz-form-item>
          </div>

        </div>
      </div>
    </ng-container>


  </form>

</div>
